How can I correctly type a set and implement it

welcome to shbcf.ru